import hyRequest from '.'

export function getRoleListRequest(st: any) {
  return hyRequest.get({
    url: `api/pub/${st}`,
  })
}

export function getDepartmentsListRequest(st: any) {
  return hyRequest.get({
    url: `api/pub/depart/${st}`,
  })
}

export function addUserRequest(userInfo: any) {
  return hyRequest.post({
    url: `api/user`,
    data: userInfo,
  })
}

export function getQiNiuTokenRequest() {
  return hyRequest.get({
    url: `api/token`,
  })
}

export function getUserInfoRequest(id: number) {
  return hyRequest.get({
    url: `api/user/${id}`,
  })
}
